<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>JSON Voorhees: jsonv::parse_options Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://www.mathjax.org/mathjax/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">JSON Voorhees
   </div>
   <div id="projectbrief">Killer JSON for C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classjsonv_1_1parse__options.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classjsonv_1_1parse__options-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">jsonv::parse_options Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Configuration for various parsing options.  
 <a href="classjsonv_1_1parse__options.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="parse_8hpp_source.html">jsonv/parse.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a301e7d4d58ec502dae5c1020ebc06f46"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46">on_error</a> { <a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46a7f3f1b58c7258329fb2c00f4c650f234">on_error::fail_immediately</a>, 
<a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46aa4fe11e30184295390723e94c1484fc3">on_error::collect_all</a>, 
<a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46a567bc1d268f135496de3d5b946b691f3">on_error::ignore</a>
 }</td></tr>
<tr class="memdesc:a301e7d4d58ec502dae5c1020ebc06f46"><td class="mdescLeft">&#160;</td><td class="mdescRight">When a parse error is encountered, what should the parser do?  <a href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46">More...</a><br /></td></tr>
<tr class="separator:a301e7d4d58ec502dae5c1020ebc06f46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdf4825f573d55b50c82d455fb93f593"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593">encoding</a> { <a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593a30df7f629fcf6b940bcaef5faf2490bb">encoding::utf8</a>, 
<a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593a0b25243e6c11fb19c7bba71f9423fd6d">encoding::utf8_strict</a>, 
<a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593a159a360043681b5483450ff467a249c9">encoding::cesu8</a>
 }</td></tr>
<tr class="memdesc:acdf4825f573d55b50c82d455fb93f593"><td class="mdescLeft">&#160;</td><td class="mdescRight">The encoding format for strings.  <a href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593">More...</a><br /></td></tr>
<tr class="separator:acdf4825f573d55b50c82d455fb93f593"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07d2a01c5527614ea710a84e8c88d714"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714">commas</a> { <a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714a2133fd717402a7966ee88d06f9e0b792">commas::strict</a>, 
<a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714aa916a0c1229fca5d4e641545b500868e">commas::allow_trailing</a>
 }</td></tr>
<tr class="memdesc:a07d2a01c5527614ea710a84e8c88d714"><td class="mdescLeft">&#160;</td><td class="mdescRight">When dealing with comma separators, how should extra commas be treated?  <a href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714">More...</a><br /></td></tr>
<tr class="separator:a07d2a01c5527614ea710a84e8c88d714"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62238f46e2076c4e3ac113345476176a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176a">numbers</a> { <a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176aabdaa3c20a3e3851599514f7c6be5f62f">numbers::decimal</a>, 
<a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176aa2133fd717402a7966ee88d06f9e0b792">numbers::strict</a>
 }</td></tr>
<tr class="memdesc:a62238f46e2076c4e3ac113345476176a"><td class="mdescLeft">&#160;</td><td class="mdescRight">How should numbers be dealt with?  <a href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176a">More...</a><br /></td></tr>
<tr class="separator:a62238f46e2076c4e3ac113345476176a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc67aea934c0bda77c0d3f3b17f0ce88"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc67aea934c0bda77c0d3f3b17f0ce88"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>size_type</b> = value::size_type</td></tr>
<tr class="separator:afc67aea934c0bda77c0d3f3b17f0ce88"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a64ef230fb92f599ead9937bb95c168d4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a64ef230fb92f599ead9937bb95c168d4">parse_options</a> ()</td></tr>
<tr class="memdesc:a64ef230fb92f599ead9937bb95c168d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance with the default options.  <a href="#a64ef230fb92f599ead9937bb95c168d4">More...</a><br /></td></tr>
<tr class="separator:a64ef230fb92f599ead9937bb95c168d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16b85fa454dcd89fada05abe80eded52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46">on_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a16b85fa454dcd89fada05abe80eded52">failure_mode</a> () const </td></tr>
<tr class="memdesc:a16b85fa454dcd89fada05abe80eded52"><td class="mdescLeft">&#160;</td><td class="mdescRight">See <code>on_error</code>.  <a href="#a16b85fa454dcd89fada05abe80eded52">More...</a><br /></td></tr>
<tr class="separator:a16b85fa454dcd89fada05abe80eded52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4046eb80de3c823518f12c43c5fa851e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4046eb80de3c823518f12c43c5fa851e"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>failure_mode</b> (<a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46">on_error</a> mode)</td></tr>
<tr class="separator:a4046eb80de3c823518f12c43c5fa851e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0044af7c29cd709225303015ad9dedf9"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a0044af7c29cd709225303015ad9dedf9">max_failures</a> () const </td></tr>
<tr class="memdesc:a0044af7c29cd709225303015ad9dedf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The maximum allowed parsing failures the parser can encounter before throwing an error.  <a href="#a0044af7c29cd709225303015ad9dedf9">More...</a><br /></td></tr>
<tr class="separator:a0044af7c29cd709225303015ad9dedf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a328371640a11ab22fd09703c5d921f24"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a328371640a11ab22fd09703c5d921f24"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>max_failures</b> (std::size_t limit)</td></tr>
<tr class="separator:a328371640a11ab22fd09703c5d921f24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8763752b079dadae3f78780a81aed3a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593">encoding</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#ac8763752b079dadae3f78780a81aed3a">string_encoding</a> () const </td></tr>
<tr class="memdesc:ac8763752b079dadae3f78780a81aed3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The output encoding for multi-byte characters in strings.  <a href="#ac8763752b079dadae3f78780a81aed3a">More...</a><br /></td></tr>
<tr class="separator:ac8763752b079dadae3f78780a81aed3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb80d2e9c91a9025894de595430f5532"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb80d2e9c91a9025894de595430f5532"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>string_encoding</b> (<a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593">encoding</a>)</td></tr>
<tr class="separator:abb80d2e9c91a9025894de595430f5532"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acded344edf6ae99bbbf167699df2ab88"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acded344edf6ae99bbbf167699df2ab88"></a>
<a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176a">numbers</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#acded344edf6ae99bbbf167699df2ab88">number_encoding</a> () const </td></tr>
<tr class="memdesc:acded344edf6ae99bbbf167699df2ab88"><td class="mdescLeft">&#160;</td><td class="mdescRight">How should a parser interpret numbers? By default, this is <code><a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176aabdaa3c20a3e3851599514f7c6be5f62f" title="Parse all forms of decimal input that we can. ">numbers::decimal</a></code>, which allows any form of decimal input. <br /></td></tr>
<tr class="separator:acded344edf6ae99bbbf167699df2ab88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb7b47c3d79df0a82e16dc6e9bb42c08"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb7b47c3d79df0a82e16dc6e9bb42c08"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>number_encoding</b> (<a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176a">numbers</a>)</td></tr>
<tr class="separator:acb7b47c3d79df0a82e16dc6e9bb42c08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24b93f3fc4a36c850b103228290a6758"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714">commas</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a24b93f3fc4a36c850b103228290a6758">comma_policy</a> () const </td></tr>
<tr class="memdesc:a24b93f3fc4a36c850b103228290a6758"><td class="mdescLeft">&#160;</td><td class="mdescRight">How should extra commas be treated? By default, this is <code><a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714aa916a0c1229fca5d4e641545b500868e" title="Allow a single trailing comma at the end of an array or object (similar to C++ enum definitions)...">commas::allow_trailing</a></code>.  <a href="#a24b93f3fc4a36c850b103228290a6758">More...</a><br /></td></tr>
<tr class="separator:a24b93f3fc4a36c850b103228290a6758"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab900a856ab6eb2b40826893ceececb44"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab900a856ab6eb2b40826893ceececb44"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>comma_policy</b> (<a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714">commas</a>)</td></tr>
<tr class="separator:ab900a856ab6eb2b40826893ceececb44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7129a3bbe69dd6f1a4bd269cef399c53"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a7129a3bbe69dd6f1a4bd269cef399c53">max_structure_depth</a> () const </td></tr>
<tr class="memdesc:a7129a3bbe69dd6f1a4bd269cef399c53"><td class="mdescLeft">&#160;</td><td class="mdescRight">The maximum allowed nesting depth of any structure in the JSON document.  <a href="#a7129a3bbe69dd6f1a4bd269cef399c53">More...</a><br /></td></tr>
<tr class="separator:a7129a3bbe69dd6f1a4bd269cef399c53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a873bc86e38735a9292765f8843821c7a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a873bc86e38735a9292765f8843821c7a"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>max_structure_depth</b> (size_type depth)</td></tr>
<tr class="separator:a873bc86e38735a9292765f8843821c7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57f5c91bc1491c9556d0d86a74d09a05"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a57f5c91bc1491c9556d0d86a74d09a05">require_document</a> () const </td></tr>
<tr class="memdesc:a57f5c91bc1491c9556d0d86a74d09a05"><td class="mdescLeft">&#160;</td><td class="mdescRight">If set to true, the result of a parse is required to have <code>kind</code> of <code>kind::object</code> or <code>kind::array</code>.  <a href="#a57f5c91bc1491c9556d0d86a74d09a05">More...</a><br /></td></tr>
<tr class="separator:a57f5c91bc1491c9556d0d86a74d09a05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17ad7d68778a3161f6691d991aafd67d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a17ad7d68778a3161f6691d991aafd67d"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>require_document</b> (bool)</td></tr>
<tr class="separator:a17ad7d68778a3161f6691d991aafd67d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1f27e329e44ce74b51edbe14a732907"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#af1f27e329e44ce74b51edbe14a732907">complete_parse</a> () const </td></tr>
<tr class="memdesc:af1f27e329e44ce74b51edbe14a732907"><td class="mdescLeft">&#160;</td><td class="mdescRight">Should the input be completely parsed to consider the parsing a success? This is on by default.  <a href="#af1f27e329e44ce74b51edbe14a732907">More...</a><br /></td></tr>
<tr class="separator:af1f27e329e44ce74b51edbe14a732907"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88902d1ea1a01f4e91c3522161b7d9bb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88902d1ea1a01f4e91c3522161b7d9bb"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>complete_parse</b> (bool)</td></tr>
<tr class="separator:a88902d1ea1a01f4e91c3522161b7d9bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cbf6c1541ff3e58d36cd48f63b4c5fc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a6cbf6c1541ff3e58d36cd48f63b4c5fc">comments</a> () const </td></tr>
<tr class="memdesc:a6cbf6c1541ff3e58d36cd48f63b4c5fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Are JSON comments allowed?  <a href="#a6cbf6c1541ff3e58d36cd48f63b4c5fc">More...</a><br /></td></tr>
<tr class="separator:a6cbf6c1541ff3e58d36cd48f63b4c5fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a2c87b54fd34826cdeb779e2fc4cbb6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a2c87b54fd34826cdeb779e2fc4cbb6"></a>
<a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>comments</b> (bool)</td></tr>
<tr class="separator:a8a2c87b54fd34826cdeb779e2fc4cbb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a699b9ee16f5c3ac8cb3d1ab1f39c1fb9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a699b9ee16f5c3ac8cb3d1ab1f39c1fb9"></a>
static <a class="el" href="classjsonv_1_1parse__options.html">parse_options</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a699b9ee16f5c3ac8cb3d1ab1f39c1fb9">create_default</a> ()</td></tr>
<tr class="memdesc:a699b9ee16f5c3ac8cb3d1ab1f39c1fb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a parser with the default options &ndash; this is the same result as the default constructor, but might be helpful if you like to be more explicit. <br /></td></tr>
<tr class="separator:a699b9ee16f5c3ac8cb3d1ab1f39c1fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27a3f08de1318c06049ec1c264f71740"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classjsonv_1_1parse__options.html">parse_options</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classjsonv_1_1parse__options.html#a27a3f08de1318c06049ec1c264f71740">create_strict</a> ()</td></tr>
<tr class="memdesc:a27a3f08de1318c06049ec1c264f71740"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a strict parser.  <a href="#a27a3f08de1318c06049ec1c264f71740">More...</a><br /></td></tr>
<tr class="separator:a27a3f08de1318c06049ec1c264f71740"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Configuration for various parsing options. </p>
<p>All parse functions should take in a <code><a class="el" href="classjsonv_1_1parse__options.html" title="Configuration for various parsing options. ">parse_options</a></code> as a paramter and should respect your settings. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="parse_07tokenizer_6_00_01const_01parse_options_6_08-example.html#_a1">parse(tokenizer&amp;, const parse_options&amp;)</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="parse_8hpp_source.html#l00114">114</a> of file <a class="el" href="parse_8hpp_source.html">parse.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a07d2a01c5527614ea710a84e8c88d714"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714">jsonv::parse_options::commas</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>When dealing with comma separators, how should extra commas be treated? </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a07d2a01c5527614ea710a84e8c88d714a2133fd717402a7966ee88d06f9e0b792"></a>strict&#160;</td><td class="fielddoc">
<p>Do not allow any extra commas anywhere &ndash; require valid JSON. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a07d2a01c5527614ea710a84e8c88d714aa916a0c1229fca5d4e641545b500868e"></a>allow_trailing&#160;</td><td class="fielddoc">
<p>Allow a single trailing comma at the end of an array or object (similar to C++ <code>enum</code> definitions). </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="parse_8hpp_source.html#l00155">155</a> of file <a class="el" href="parse_8hpp_source.html">parse.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="acdf4825f573d55b50c82d455fb93f593"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593">jsonv::parse_options::encoding</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The encoding format for strings. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="acdf4825f573d55b50c82d455fb93f593a30df7f629fcf6b940bcaef5faf2490bb"></a>utf8&#160;</td><td class="fielddoc">
<p>Use UTF-8 like a sane library should. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://www.unicode.org/versions/Unicode6.2.0/ch03.pdf#G7404">http://www.unicode.org/versions/Unicode6.2.0/ch03.pdf#G7404</a> </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="acdf4825f573d55b50c82d455fb93f593a0b25243e6c11fb19c7bba71f9423fd6d"></a>utf8_strict&#160;</td><td class="fielddoc">
<p>Like <code>utf8</code>, but check that there are no unprintable characters in the input stream (see <code>std::isprint</code>). </p>
<p>To contrast this with <code>utf8</code>, this mode will reject things such as the <code>tab</code> and <code>newline</code> characters, while this will reject them. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="acdf4825f573d55b50c82d455fb93f593a159a360043681b5483450ff467a249c9"></a>cesu8&#160;</td><td class="fielddoc">
<p>Use the CESU-8 Compatibility Encoding Scheme for UTF-16? It is generally not recommended unless your processing environment requires binary collation with UTF-16. </p>
<p>If you do not know you need this, you probably do not.</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://www.unicode.org/reports/tr26/">http://www.unicode.org/reports/tr26/</a> </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="parse_8hpp_source.html#l00133">133</a> of file <a class="el" href="parse_8hpp_source.html">parse.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="a62238f46e2076c4e3ac113345476176a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176a">jsonv::parse_options::numbers</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>How should numbers be dealt with? </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a62238f46e2076c4e3ac113345476176aabdaa3c20a3e3851599514f7c6be5f62f"></a>decimal&#160;</td><td class="fielddoc">
<p>Parse <em>all</em> forms of decimal input that we can. </p>
<p>To contrast this from <code>strict</code>, the <code>decimal</code> does not allow leading zeros on numbers. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a62238f46e2076c4e3ac113345476176aa2133fd717402a7966ee88d06f9e0b792"></a>strict&#160;</td><td class="fielddoc">
<p>Strictly comply with the JSON specification for numbers &ndash; no leading zeros! </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="parse_8hpp_source.html#l00164">164</a> of file <a class="el" href="parse_8hpp_source.html">parse.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="a301e7d4d58ec502dae5c1020ebc06f46"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46">jsonv::parse_options::on_error</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>When a parse error is encountered, what should the parser do? </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a301e7d4d58ec502dae5c1020ebc06f46a7f3f1b58c7258329fb2c00f4c650f234"></a>fail_immediately&#160;</td><td class="fielddoc">
<p>Immediately throw a <code><a class="el" href="classjsonv_1_1parse__error.html" title="An error encountered when parsing. ">parse_error</a></code> &ndash; do not attempt to construct a partial result. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a301e7d4d58ec502dae5c1020ebc06f46aa4fe11e30184295390723e94c1484fc3"></a>collect_all&#160;</td><td class="fielddoc">
<p>Attempt to continue parsing and constructing a result. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a301e7d4d58ec502dae5c1020ebc06f46a567bc1d268f135496de3d5b946b691f3"></a>ignore&#160;</td><td class="fielddoc">
<p>Ignore all errors and pretend to be successful. </p>
<p>This is not recommended unless you are 100% certain the JSON you are attempting to parse is valid. Using this failure mode does not improve parser performance. </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="parse_8hpp_source.html#l00120">120</a> of file <a class="el" href="parse_8hpp_source.html">parse.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a64ef230fb92f599ead9937bb95c168d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">jsonv::parse_options::parse_options </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create an instance with the default options. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a24b93f3fc4a36c850b103228290a6758"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714">commas</a> jsonv::parse_options::comma_policy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>How should extra commas be treated? By default, this is <code><a class="el" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714aa916a0c1229fca5d4e641545b500868e" title="Allow a single trailing comma at the end of an array or object (similar to C++ enum definitions)...">commas::allow_trailing</a></code>. </p>

</div>
</div>
<a class="anchor" id="a6cbf6c1541ff3e58d36cd48f63b4c5fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool jsonv::parse_options::comments </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Are JSON comments allowed? </p>
<dl class="section warning"><dt>Warning</dt><dd>There is no "official" syntax for JSON comments, but this system allows </dd></dl>

</div>
</div>
<a class="anchor" id="af1f27e329e44ce74b51edbe14a732907"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool jsonv::parse_options::complete_parse </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Should the input be completely parsed to consider the parsing a success? This is on by default. </p>
<p>Disabling this option can be useful for situations where JSON input is coming from some stream and you wish to process distinct objects separately (this technique is used to great effect in jq: <a href="http://stedolan.github.io/jq/">http://stedolan.github.io/jq/</a>).</p>
<dl class="section warning"><dt>Warning</dt><dd>When using this option, it is best to construct a <code>tokenizer</code> for your input stream and reuse that. The <code>parse</code> functions all internally buffer your <code>istream</code> and while they <em>attempt</em> to use <code>putback</code> re-put characters back into the <code>istream</code>, they are not necessarily successful at doing so. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="parse_07tokenizer_6_00_01const_01parse_options_6_08-example.html#a2">parse(tokenizer&amp;, const parse_options&amp;)</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a27a3f08de1318c06049ec1c264f71740"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classjsonv_1_1parse__options.html">parse_options</a> jsonv::parse_options::create_strict </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a strict parser. </p>
<p>In general, these options are meant to fail on anything that is not a 100% valid JSON document. More specifically:</p>
<div class="fragment"><div class="line"><a class="code" href="classjsonv_1_1parse__options.html#a16b85fa454dcd89fada05abe80eded52">failure_mode</a>() == <a class="code" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46a7f3f1b58c7258329fb2c00f4c650f234">on_error::fail_immediately</a></div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#ac8763752b079dadae3f78780a81aed3a">string_encoding</a>() == <a class="code" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593a0b25243e6c11fb19c7bba71f9423fd6d">encoding::utf8_strict</a></div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#acded344edf6ae99bbbf167699df2ab88">number_encoding</a>() == <a class="code" href="classjsonv_1_1parse__options.html#a62238f46e2076c4e3ac113345476176aa2133fd717402a7966ee88d06f9e0b792">numbers::strict</a></div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#a24b93f3fc4a36c850b103228290a6758">comma_policy</a>() == <a class="code" href="classjsonv_1_1parse__options.html#a07d2a01c5527614ea710a84e8c88d714a2133fd717402a7966ee88d06f9e0b792">commas::strict</a></div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#a7129a3bbe69dd6f1a4bd269cef399c53">max_structure_depth</a>() == 20</div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#a57f5c91bc1491c9556d0d86a74d09a05">require_document</a>() == <span class="keyword">true</span></div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#af1f27e329e44ce74b51edbe14a732907">complete_parse</a>() == <span class="keyword">true</span></div>
<div class="line"><a class="code" href="classjsonv_1_1parse__options.html#a6cbf6c1541ff3e58d36cd48f63b4c5fc">comments</a>() == <span class="keyword">false</span></div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a16b85fa454dcd89fada05abe80eded52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46">on_error</a> jsonv::parse_options::failure_mode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>See <code>on_error</code>. </p>
<p>The default failure mode is <code>fail_immediately</code>. </p>

</div>
</div>
<a class="anchor" id="a0044af7c29cd709225303015ad9dedf9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t jsonv::parse_options::max_failures </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The maximum allowed parsing failures the parser can encounter before throwing an error. </p>
<p>This is only applicable if the <code>failure_mode</code> is not <code><a class="el" href="classjsonv_1_1parse__options.html#a301e7d4d58ec502dae5c1020ebc06f46a7f3f1b58c7258329fb2c00f4c650f234" title="Immediately throw a parse_error – do not attempt to construct a partial result. ">on_error::fail_immediately</a></code>. By default, this value is 10.</p>
<p>You should probably not set this value to an unreasonably high number, as each parse error encountered must be stored in memory for some period of time. </p>

</div>
</div>
<a class="anchor" id="a7129a3bbe69dd6f1a4bd269cef399c53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_type jsonv::parse_options::max_structure_depth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The maximum allowed nesting depth of any structure in the JSON document. </p>
<p>The JSON specification technically limits the depth to 20, but very few implementations actually conform to this, so it is fairly dangerous to set this value. By default, the value is 0, which means we should not do any depth checking. </p>

</div>
</div>
<a class="anchor" id="a57f5c91bc1491c9556d0d86a74d09a05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool jsonv::parse_options::require_document </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If set to true, the result of a parse is required to have <code>kind</code> of <code>kind::object</code> or <code>kind::array</code>. </p>
<p>By default, this is turned off, which will allow <code>parse</code> to return incomplete documents. </p>

</div>
</div>
<a class="anchor" id="ac8763752b079dadae3f78780a81aed3a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classjsonv_1_1parse__options.html#acdf4825f573d55b50c82d455fb93f593">encoding</a> jsonv::parse_options::string_encoding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The output encoding for multi-byte characters in strings. </p>
<p>The default value is UTF-8 because UTF-8 is best. Keep in mind this changes the output encoding for <em>all</em> decoded strings. If you need mixed encodings, you must handle that in your application. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>jsonv/<a class="el" href="parse_8hpp_source.html">parse.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>jsonv</b></li><li class="navelem"><a class="el" href="classjsonv_1_1parse__options.html">parse_options</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
  </ul>
</div>
</body>
</html>
